home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / mawk10.zip / BMAWK_TE.BAT < prev    next >
DOS Batch File  |  1991-10-06  |  1KB  |  50 lines

  1. echo off
  2. rem  This is a simple test that a new made mawk seems to
  3. rem  be working OK.
  4. rem  It's certainly not exhaustive, but the last two tests in
  5. rem  particular use most features.
  6. rem
  7. rem  It needs to be run from mawk\msdos\dostest and mawk needs to be in ..\..
  8. rem
  9. rem  it's too bad that years after MSDOS was introduced that basic
  10. rem  system utilities like fc still don't return valid exit codes!!!
  11.  
  12. set dat=mawk_tes.dat
  13.  
  14. rem  find out which mawk we're testing
  15. ..\..\mawk -V
  16.  
  17. rem ################################
  18.  
  19. echo testing input and field splitting
  20. ..\..\bmawk -f ..\..\test\wc.awk %dat% > temp$$
  21. fc temp$$ wc-awk.out
  22. if errorlevel 1 goto :done
  23.  
  24. rem ####################################
  25.  
  26. echo testing regular expression matching
  27. ..\..\bmawk -f ..\..\test\reg0.awk %dat% > temp$$
  28. ..\..\bmawk -f ..\..\test\reg1.awk %dat% >> temp$$
  29. ..\..\bmawk -f ..\..\test\reg2.awk %dat% >> temp$$
  30. fc temp$$ reg-awk.out
  31. if errorlevel 1 goto :done
  32.  
  33. rem ######################################
  34.  
  35. echo testing arrays and flow of control
  36. ..\..\bmawk -f ..\..\test\wfrq0.awk %dat% > temp$$
  37. fc temp$$ wfrq-awk.out
  38. if errorlevel 1 goto :done
  39.  
  40. rem ################################
  41.  
  42. echo testing function calls and general stress test
  43. ..\..\bmawk -f ..\..\examples\decl.awk %dat% > temp$$
  44. fc temp$$ decl-awk.out
  45. if errorlevel 1 goto :done
  46.  
  47. echo if fc always encountered "no differences", then the tested mawk seems OK
  48. del temp$$
  49. :done
  50.